package com.queue.receiver;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import com.queue.config.FanoutConfig;
import com.queue.config.TopicConfig;

/**
* @comments
* @author  zg
* @date 2018年11月11日
*/
@Component
public class FanoutMsgReceiver {

	@RabbitListener(queues = FanoutConfig.QUEUE_A)
	public void rcv1(String obj) {
		System.out.println(FanoutConfig.QUEUE_A + " received:" + obj);
	}

	@RabbitListener(queues = FanoutConfig.QUEUE_B)
	public void rcv2(String obj) {
		System.out.println(FanoutConfig.QUEUE_B + " received:" + obj);
	}
	
	@RabbitListener(queues = FanoutConfig.QUEUE_C)
	public void rcv3(String obj) {
		System.out.println(FanoutConfig.QUEUE_C + " received:" + obj);
	}
}
